package com.uqbar.asteroids.scenes;

import java.util.ArrayList;

import com.uqbar.asteroids.components.BigAsteroid;
import com.uqbar.asteroids.components.CircleShoot;
import com.uqbar.asteroids.components.MediumAsteriod;
import com.uqbar.asteroids.components.Player;
import com.uqbar.asteroids.components.PlayerShip;
import com.uqbar.asteroids.components.TinyAsteroid;
import com.uqbar.vainilla.GameScene;

public class AsteroidScene extends GameScene{
	private Player jugador;
	private PlayerShip shipselected;
	private ArrayList<BigAsteroid> asteroidesGrandes = new ArrayList<BigAsteroid>();
	private ArrayList<MediumAsteriod> asteroidesMedianos = new ArrayList<MediumAsteriod>();
	private ArrayList<TinyAsteroid> asteroidesChicos = new ArrayList<TinyAsteroid>();
	
	private ArrayList<CircleShoot> poolDisparos = new ArrayList<CircleShoot>();
	private ArrayList<CircleShoot> disparosEnEscena = new ArrayList<CircleShoot>();

	public ArrayList<BigAsteroid> getAsteroidesGrandes() {
		return asteroidesGrandes;
	}

	public void setAsteroidesGrandes(ArrayList<BigAsteroid> asteroidesGrandes) {
		this.asteroidesGrandes = asteroidesGrandes;
	}

	public ArrayList<MediumAsteriod> getAsteroidesMedianos() {
		return asteroidesMedianos;
	}

	public void setAsteroidesMedianos(ArrayList<MediumAsteriod> asteroideMediano) {
		this.asteroidesMedianos = asteroideMediano;
	}

	public ArrayList<TinyAsteroid> getAsteroidesChicos() {
		return asteroidesChicos;
	}

	public void setAsteroidesChicos(ArrayList<TinyAsteroid> asteroideChico) {
		this.asteroidesChicos = asteroideChico;
	}

	public PlayerShip getShipselected() {
		return shipselected;
	}

	public void setShipselected(PlayerShip shipselected) {
		this.shipselected = shipselected;
		this.addComponent(shipselected);
	}


	public ArrayList<CircleShoot> getDisparos() {
		return poolDisparos;
	}

	public void setDisparos(ArrayList<CircleShoot> disparos) {
		this.poolDisparos = disparos;
	}

	public ArrayList<CircleShoot> getDisparosEnEscena() {
		return disparosEnEscena;
	}

	public void setDisparosEnEscena(ArrayList<CircleShoot> disparosEnEscena) {
		this.disparosEnEscena = disparosEnEscena;
	}

	public Player getJugador() {
		return jugador;
	}

	public void setJugador(Player jugador) {
		this.jugador = jugador;
		this.addComponent(jugador);
	}

	public void agregarDisparo(CircleShoot shoot) {
		this.disparosEnEscena.add(shoot);
		this.addComponent(shoot);
	}
	
	public void shootToPool(CircleShoot shoot){
		this.disparosEnEscena.remove(shoot);
		this.poolDisparos.add(shoot);
		shoot.toOutScreen();
	}
	
	public CircleShoot obtenerDisparo(){
		CircleShoot disparo = this.poolDisparos.get(0);
		this.poolDisparos.remove(0);
		this.disparosEnEscena.add(disparo);
		return disparo;
	}
	
	public void addBigAsteroid(BigAsteroid ba){
		this.asteroidesGrandes.add(ba);
	}
	
	public BigAsteroid getBigAsteroid(){
		BigAsteroid ret = this.asteroidesGrandes.get(0);
		this.asteroidesGrandes.remove(0);
		return ret;
	}
	
	public void addMediumAsteriod(MediumAsteriod ma){
		this.asteroidesMedianos.add(ma);
	}
	
	public MediumAsteriod getMediumAsteriod(){
		MediumAsteriod ret = this.asteroidesMedianos.get(0);
		this.asteroidesMedianos.remove(0);
		return ret;
	}
	
	public void addTinyAsteroid(TinyAsteroid ta){
		this.asteroidesChicos.add(ta);
	}
	
	public TinyAsteroid getTinyAsteriod(){
		TinyAsteroid ret = this.asteroidesChicos.get(0);
		this.asteroidesChicos.remove(0);
		return ret;
	}
	
	
}
